﻿using MySql.Data.Entity;
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.Migrations.History;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace de.wolfmarco.pas.Shared.Database
{
    public class PasMySqlHistoryContext : MySqlHistoryContext
    {
        public PasMySqlHistoryContext( DbConnection existingConnection, string defaultSchema )
            :base(existingConnection, defaultSchema )
        {
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            //modelBuilder.Entity<HistoryRow>().ToTable(tableName: "MigrationHistory", schemaName: "admin");
            //modelBuilder.Entity<HistoryRow>().Property(p => p.MigrationId).HasColumnName("Migration_ID");

            //modelBuilder.Entity<HistoryRow>().ToTable("MigrationHistory");
        }
    }
}
